package com.xingkeduo.config;

import com.xingkeduo.util.tool.ConstantUtil;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

/**
 * @author chi  2019-01-29 10:27
 **/
public class MybatisPlusCondition implements Condition {
    @Override
    public boolean matches(ConditionContext arg0, AnnotatedTypeMetadata arg1) {
        return System.getProperty(ConstantUtil.DATABASE).indexOf(",MYBATIS_PLUS,") > -1;
    }
}
